QT       += core concurrent widgets

TARGET = VisiyunSDK
TEMPLATE = lib
CONFIG += plugin

# 启用C++11
CONFIG += c++11

# 输出到主程序的测量算法目录（根据调试/发布模式 + 32/64位架构区分路径）
contains(CONFIG, debug) {
    # 调试模式路径
    contains(QT_ARCH, i386) {
        # 32位架构
        DESTDIR = ../../build/debug/x86/SDK
        LIBS += -L$$PWD/../../../SDK/vsydll/x86/debug/ -lVsyCam
        QMAKE_POST_LINK = cmd /C "IF NOT EXIST \"$$shell_path($$DESTDIR)\" mkdir \"$$shell_path($$DESTDIR)\" & copy /y \"$$shell_path($$PWD/../../../SDK/vsydll/x86/debug/VsyCam.dll)\" \"$$shell_path($$DESTDIR/../VsyCam.dll)\""
    } else {
        # 64位架构（兼容x86_64/amd64等）
        DESTDIR = ../../build/debug/x64/SDK
        LIBS += -L$$PWD/../../../SDK/vsydll/x64/debug/ -lVsyCam
        QMAKE_POST_LINK = cmd /C "IF NOT EXIST \"$$shell_path($$DESTDIR)\" mkdir \"$$shell_path($$DESTDIR)\" & copy /y \"$$shell_path($$PWD/../../../SDK/vsydll/x64/debug/VsyCam.dll)\" \"$$shell_path($$DESTDIR/../VsyCam.dll)\""
    }
} else {
    # 发布模式路径
    contains(QT_ARCH, i386) {
        # 32位架构
        DESTDIR = ../../build/release/x86/SDK
        LIBS += -L$$PWD/../../../SDK/vsydll/x86/release/ -lVsyCam
        QMAKE_POST_LINK = cmd /C "IF NOT EXIST \"$$shell_path($$DESTDIR)\" mkdir \"$$shell_path($$DESTDIR)\" & copy /y \"$$shell_path($$PWD/../../../SDK/vsydll/x86/release/VsyCam.dll)\" \"$$shell_path($$DESTDIR/../VsyCam.dll)\""
    } else {
        # 64位架构
        DESTDIR = ../../build/release/x64/SDK
        LIBS += -L$$PWD/../../../SDK/vsydll/x64/release/ -lVsyCam
        QMAKE_POST_LINK = cmd /C "IF NOT EXIST \"$$shell_path($$DESTDIR)\" mkdir \"$$shell_path($$DESTDIR)\" & copy /y \"$$shell_path($$PWD/../../../SDK/vsydll/x64/release/VsyCam.dll)\" \"$$shell_path($$DESTDIR/../VsyCam.dll)\""
    }
}

INCLUDEPATH += ../../DeviceManagementPlugin \
               ../../../SDK/vsydll

DEPENDPATH += $$PWD/../../../SDK/vsydll

FORMS += \
    CameraParametersWidget.ui \
    CameraTriggerSettings.ui

SOURCES += \
    CameraTriggerSettings.cpp \
    VisiyunSDK.cpp \
    VisiyunDevice.cpp \
    CameraParametersWidget.cpp

HEADERS += \
    CameraTriggerSettings.h \
    VisiyunSDK.h \
    VisiyunDevice.h \
    CameraParametersWidget.h \
    ../../DeviceManagementPlugin/SDKInterface.h \
    ../../DeviceManagementPlugin/CameraSDKInterface.h

